package com.json.dao.hibernate;

import java.util.List;

import org.appfuse.dao.hibernate.GenericDaoHibernate;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.json.dao.TaskMasterDao;
import com.json.model.TaskMaster;

@Repository("taskMasterDao")
public class TaskMasterDaoHibernate extends GenericDaoHibernate<TaskMaster, Long> implements TaskMasterDao {

	public TaskMasterDaoHibernate() {
		super(TaskMaster.class);
		// TODO Auto-generated constructor stub
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<TaskMaster> getTasksByDescription(String taskDescr) {
		// TODO Auto-generated method stub
		  return getSession().createCriteria(TaskMaster.class).add(Restrictions.eq("taskDescrp", taskDescr)).list();
	}

	
}
